package com.lazycat.backend.service.impl.user;

import com.lazycat.backend.mapper.CommentMapper;
import com.lazycat.backend.pojo.Comment;
import com.lazycat.backend.service.user.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CommentServiceImpl implements CommentService {

    @Autowired
    private CommentMapper commentMapper;

    @Override
    public void comment(Integer goodId, Integer commentatorId, String text) {
        Comment comment = new Comment(null, goodId, commentatorId, text);
        commentMapper.insert(comment);
    }
}
